home *** CD-ROM | disk | FTP | other *** search
/ Programmer Plus 2007 / Programmer-Plus-2007.iso / Programming / Report Writers / Crystal Repot 9.0 Full CD version / Setup.exe / Windows / System32 / HTMLRE90.DLL / HTML / 11697 < prev    next >
Encoding:
Text File  |  2002-07-05  |  3.3 KB  |  142 lines

  1. <HTML>
  2.  
  3. <HEAD>
  4.     <LINK REL="stylesheet" TYPE="text/css" HREF="%1css/default.css">
  5.  
  6. <script language="Javascript">
  7. //LOCALIZATION STRINGS
  8. var _strNameMissing = "Please enter an event name.";
  9. var _strNameTooLong = "Please limit the name to 100 characters.";
  10. var _strEventServerMissing = "You may not create a file event without an event server.";
  11.  
  12. var _strFileNameMissing = "Please enter a filename.";
  13.  
  14. var _strDescTooLong = "Please limit the description to 256 characters.";
  15. </script>
  16.  
  17. <SCRIPT language=Javascript>
  18. function onSubmit()
  19. {
  20.   // If submitting a file event, the eventServer may not be ""
  21.   if (document.forms.event_prop.eventServer != null)
  22.   {
  23.     if (document.forms.event_prop.eventServer.value == "")
  24.     {
  25.      alert(_strEventServerMissing);
  26.      document.forms.event_prop.eventServer.focus();
  27.        return;
  28.     }
  29.    }
  30.  
  31.   // Check for account name, description, and file name (for file events)
  32.  
  33.   // Name
  34.   var strName = document.forms.event_prop.eventName.value;
  35.   if (strName.length == 0)
  36.   {
  37.    alert(_strNameMissing);
  38.    document.forms.event_prop.eventName.focus();
  39.      return;
  40.   }
  41.   if (strName.length > 100)
  42.   {
  43.    alert(_strNameTooLong);
  44.    document.forms.event_prop.eventName.focus();
  45.      return;
  46.   }
  47.  
  48.   // Filename
  49.   if (document.forms.event_prop.fileName != null)
  50.   {
  51.     var strFileName = document.forms.event_prop.fileName.value;
  52.     if (strFileName.length == 0)
  53.     {
  54.        alert(_strFileNameMissing);
  55.      document.forms.event_prop.fileName.focus();
  56.        return;
  57.     }
  58.   }
  59.  
  60.   // Description
  61.   var strDesc = document.forms.event_prop.eventDesc.value;
  62.   if (strDesc.length >= 256)
  63.   {
  64.    alert(_strDescTooLong);
  65.    document.forms.event_prop.eventDesc.focus();
  66.      return;
  67.   }
  68.  
  69.     // Submit the properies
  70.     document.event_prop.submit();
  71. }
  72.  
  73. function handleTypeChange(t)
  74. {
  75.   document.forms.event_prop.target = "_self";
  76.   document.forms.event_prop.action = "%2" + "&eventType=" + t;
  77.   document.forms.event_prop.submit();
  78. }
  79.  
  80. function onInit()
  81. {
  82.   document.forms.event_prop.eventType.selectedIndex=%3;
  83.   document.forms.event_prop.eventType.focus();
  84. }
  85.  
  86.  
  87. </SCRIPT>
  88.  
  89. </HEAD>
  90.  
  91. <BODY onLoad="onInit()" TOPMARGIN="0" LEFTMARGIN="5" MARGINHEIGHT="0" MARGINWIDTH="5">
  92.  
  93. <FORM action="%4" method="post" name="event_prop" target="target_frame">
  94.  
  95. <table>
  96.   <tr>
  97.     <td class="list">Type:</td>
  98.     <td class="list"><select tabindex=1 name=eventType onchange='handleTypeChange(this.options[this.selectedIndex].value)'>
  99. %5
  100.         </select></td>
  101.   </tr>
  102.  
  103.   <tr><td> </td></tr>
  104.  
  105.   <tr>
  106.     <td class="list">Event Name:</td>
  107.     <td class="list"><input tabindex=2 name="eventName" value="%6" size=40></td>
  108.   </tr>
  109.  
  110.   <tr>
  111.     <td class="list">Description:</td>
  112.     <td class="list"><textarea wrap="virtual" tabindex=3 name="eventDesc" rows="7" cols="40">%7</textarea></td>
  113.   </tr>
  114.  
  115. %8
  116.  
  117. </table>
  118.  
  119. <BR>
  120.  
  121.  
  122. <table align=center CELLPADDING="0" CELLSPACING="5" border=0 width=20%>
  123. <tr>
  124.     <td><table cellpadding=0 border=0> 
  125.         <tr>
  126.             <td class="clsButton" align=middle nowrap>
  127.                 <div class="clsButton"><a href="javascript:onSubmit()" tabindex=11>OK</a></div>
  128.             </td>
  129.  
  130.             <td class="clsButton" align=middle nowrap>
  131.                 <div class="clsButton"><a href="javascript: window.top.goEvents();" tabindex=12>Cancel</a></div>
  132.             </td>
  133.         </tr>
  134.     </table></td>
  135. </tr>    
  136. </table>
  137.  
  138. </form>
  139.  
  140. </BODY>
  141. </HTML>
  142.